#ifndef VTKFIELDEXPORT_BOUNDARY_HPP
#define VTKFIELDEXPORT_BOUNDARY_HPP

#include "vtkFieldExport_SWEBoundary.hpp"
#include "vtkFunctions_export.hpp"
#include "bc_base_all.hpp"
#include "tinyxml2.h"
#include "magic_enum.hpp"

namespace hms::vtk
{

namespace xml = tinyxml2;


/* StaticValue */
template<typename MeshType>
void writeBoundaryCondition(
	xml::XMLElement* bcElem,
	const StaticValue<MeshType>* bc
);


/* DynamicValue */
template<typename MeshType>
void writeBoundaryCondition(
	xml::XMLElement* bcElem,
	const DynamicValue<MeshType>* bc
);


template<typename SolverType>
void writeBoundaryCondition(
	xml::XMLElement* patchNode,
	const BoundaryPatch& patch,
	const SolverBase<SolverType>& solver,
	typename SolverBase<SolverType>::FieldName fieldName
);

namespace internal
{

std::vector<xml::XMLElement*> boundaryPatchNodes(
	xml::XMLNode* root,
	const std::vector<BoundaryPatch>& boundaryPatches
);

} // namespace internal


template<typename SolverType>
void writeBoundaryConditions(
	xml::XMLNode* root,
	const SolverBase<SolverType>& solver,
	typename SolverBase<SolverType>::FieldName fieldName
);


template<typename SolverType>
void writeBoundaryConditions(
	xml::XMLNode* root,
	const SolverBase<SolverType>& solver
);

void writeDefaultBoundaryConditions(
	xml::XMLNode* root,
	const MeshVariant&
);


} // namespace hms::vtk

#include "vtkFieldExport_boundary.tpp"

#endif